package sm.pzavoli.mercato;

import java.text.SimpleDateFormat;
import java.util.Date;

public class ValoreStorico extends java.lang.Object {
	Date m_dt;
	int m_volume;
	double m_max;
	double m_min;
	double m_open;
	double m_close;
	public ValoreStorico(String sdt, double open, double high,double low,double close, int volume) {
		SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
		try {
			Date dt = sf.parse(sdt);
			m_dt = dt;
		} catch(Exception e) {
			m_dt = null;
		}
		m_volume = volume;
		m_max = high;
		m_min = low;
		m_open = open;
		m_close = close;
	}
	public ValoreStorico(Date dt, double open, double high,double low,double close, int volume) {
		m_dt = dt;
		m_volume = volume;
		m_max = high;
		m_min = low;
		m_open = open;
		m_close = close;
	}
	
	public double getPrezzo() {
		return m_close;
	}
	
	public Date getDate() {
		return m_dt;
	}

}
